﻿@{
    ViewBag.Title = "Calculator";
    Layout = "~/Views/Shared/_Layout.cshtml";
}

<link href="@Url.Content("~/Content/Calculator_Style.css")" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="@Url.Content("~/Scripts/app/Validate.js")"></script>

<script type="text/javascript">
    function change_rand() {
        $("img.validate").attr('src', '/Login/ValidateCode?d=' + new Date().getTime());
    }

    //验证+Ajax 显示贷款信息
    function Validate() {
        var principal = $("#principal");
        var period = $("#period");
        if (principal.val().trim() == "") {
            alert("请输入您要借款的金额");
            principal.focus();
            return false;
        }
        else if (!/^\d+$/.test(principal.val())) {
            alert("借款金额只能输入正整数");
            principal.focus();
            return false;
        }
        else if (principal.val() % 100 != 0) {
            alert("金额需是100的倍数");
            principal.focus();
            return false;
        }
        $.ajax({
            type: "post",
            url: "/Login/CalculatorShow",
            data: { Principal: principal.val(), Period: period.val() },
            success: function (data) {
                $("#counterBox_table1").html(data);
            }
        })
        $("#counterBox_table1").show();
        return true;
    }

    function InputValidate() {
        var Name = $("#username");
        var PassWord = $("#PassWord");
        var Srand = $("#srand");
        if (Name.val().trim() == "") {
            alert("请输入用户名");
            Name.focus();
            return false;
        }
        else if (PassWord.val().trim() == "") {
            alert("请输入密码");
            PassWord.focus();
            return false;
        }
        else if (Srand.val().trim() == "") {
            alert("请输入验证码");
            Srand.focus();
            return false;
        }
        return true;
    }

    $(function () {
        $("#btnSubmit").click(function () {
            var isSubmit = true;
            var name = $("#username").val();
            var passWord = $("#PassWord").val();
            var srand = $("#srand").val();
            var backUrl = document.referrer;
            var isTrue = InputValidate();
            if (isTrue) {
                $.ajax({
                    type: "post",
                    url: "/Login/ValidateForm",
                    data: { Name: name, PassWord: passWord, Srand: srand },
                    success: function (data) {
                        if (data == "")
                            window.location.href = backUrl;
                        else {
                            alert(data);
                            change_rand();
                        }
                    }
                })
            }
            return false;
        });
    });
</script>

<div class="main main_gray">
    <div class="main_gray_top"><span class="main_gray_top_right"></span></div>
    <div class="main_box pt0 pb0 pr30 pl30 pr clearfix">
        <div class="content_left fl">
            <h2 class="pl30 procedure fb col666 f14 png mt30">借款流程</h2>
            <p class="t3 pt10 col666">欢迎您来到升付金融，升付金融是中国知名的个人信用借款咨询服务平台，您现在应该做的是：<a href="/Login/Register" class="colf57007">注册</a><span class="colf57007">或</span><a href="/Login/SignIn" class="colf57007">登录</a></p>
            <img alt="借款流程" title="借款流程" class="pt20" src="/Images/borrowGuide.jpg">
            <h2 class="pl30 counter fb col666 f14 png mt15 mb15">借款计算器</h2>
            <p class="col666 lh180 p mb20">升付金融采用的是通用的"等额本息还款法"，即借款人每月以相等的金额偿还贷款本息，也是银行房贷等采用的方法。使用利息计算器，能帮您计算每月需要偿还的本息情况；同时，一份完整的本息偿还时间表，让您能更直观地了解还款本息详情(计算中采用四舍五入)</p>

            <div class="counterBox w620 bc mb30 tab_content1">
                <input type="hidden" value="jy" class="mode" />
                <div class="counterBox_row mt50">
                    <div class="w220 colblack2 fl tr">
                        <label class="label_text">您要借款的金额</label>
                    </div>
                    <div class=" tl pl250">
                        <input type="text" id="principal" class="input_text w180 ie67 principal" />
                    </div>
                </div>
                <div class="counterBox_row clearfix mt20">
                    <div class="w220 colblack2 fl tr">
                        <label class="label_text">您要借款的期限</label>
                    </div>
                    <div class=" tl pl250">
                        <select class="select_bg period" id="period">
                            <option value="12">12期</option>
                            <option value="18">18期</option>
                            <option value="24">24期</option>
                            <option value="36">36期</option>
                        </select>
                        <input type="hidden" id="rate" value="10" class="rate">
                    </div>
                </div>
                <div class="counterBox_row clearfix mt20">
                    <div class="w220 colblack2 fl tr">
                        <label class="label_text">&nbsp;</label>
                    </div>
                    <div class=" tl pl250">
                        <input type="submit" id="jyd" class="gray_btn_large counter_button" value="计算" onclick="return Validate()" />
                    </div>
                </div>
                <div class="counterBox_table2 pt20 mt15 none" id="counterBox_table1">
                    @RenderPage("CalculatorPartial.cshtml");
                </div>
        </div>
        <h2 class="pl30 calendar fb col666 f14 png mt15 mb15">借款资格、额度及准备资料</h2>
        <h4 class="fb col666 ">1、借款资格：</h4>
        <p class="pt20 pb5 col666 lh180">（1）借款人年龄在22周岁（含）至55周岁之间；</p>
        <p class="pt5 pb5 col666 lh180">（2）借款人的税后月薪需在<span class="colred">4000元</span>人民币以上。</p>
        <h4 class="fb col666 ">2、借款金额、期限</h4>
        <table cellpadding="0" cellspacing="0" class="help_jyd_table mb30">
            <tr>
                <th>借款额度</th>
                <td>1-50万元</td>
            </tr>
            <tr>
                <th>借款期限</th>
                <td>12个月、18个月、24个月、36个月   四种供用户选择</td>
            </tr>
        </table>
        <h4 class="fb col666 ">3、借款需要准备的资料</h4>
        <p class="p col666 pt20">1、	身份证</p>
        <p class="p col666">2、	银行工资卡流水</p>
        <p class="p col666">3、	个人信用报告</p>
        <h2 class="pl30 calendar fb col666 f14 png mt30 mb15">借款可以用来做什么</h2>
        <p class="p col666 lh180">您在生活、工作或者学习中如需要借款，都可以在升付金融申请。</p>
        <p class="p pt10 col666 lh180">借款可以用来：生意周转、扩大生产、备货、创业、旅游、培训、结婚、住院看病、个人消费（家居家电、电子产品等等）、短期生活周转等等。</p>
        <p class="pt30 pb30"><a href="/Login/Register" class="regiister_btn bc">免费注册</a></p>
    </div>
    <div class="side_right fl">
        <p class="pt30 pb15"><a href="/Login/Register" class="regiister_btn bc">免费注册</a></p>
        <div class="sideBox p10 w225 br5">
            <p class="col666">已经注册宜信通行证？请登录</p>
            <form class="col666" class="login_from ml540 mt15" action="/Login/SignIn" method="post" name="theform">
                <div class="counterBox_row clearfix mt15">
                    <div class=" w40 colblack2 fl tr">
                        <label class="label_text" for="username">账&nbsp;&nbsp;户</label>
                    </div>
                    <div class=" tl pl50">
                        <input type="text" class="input_text w165 ie67" maxlength="50" name="username" id="username" value="" placeholder="请输入邮箱/手机号">
                    </div>
                </div>
                <div class="counterBox_row clearfix pt5 warn_text">
                    <div class="w40 fl tr">
                        <label class="">&nbsp;</label>
                    </div>
                    <div class=" tl pl50 colred4 s_nick_user" id="s_nick_user"></div>
                </div>
                <div class="counterBox_row clearfix mt5">
                    <div class=" w40 colblack2 fl tr">
                        <label class="label_text" for="password">密&nbsp;&nbsp;码</label>
                    </div>
                    <div class=" tl pl50">
                        <input type="password" class="input_text w165 ie67" maxlength="16" name="PassWord" id="PassWord" placeholder="请输入密码">
                    </div>
                </div>
                <div class="counterBox_row clearfix pt5 warn_text">
                    <div class="w40 fl tr">
                        <label class="">&nbsp;</label>
                    </div>
                    <div class=" tl pl50 colred4 s_user_pwd1" id="s_user_pwd1"></div>
                </div>
                <div class="counterBox_row clearfix mt5">
                    <div class=" w40 colblack2 fl tr">
                        <label class="label_text" for="srand">验证码</label>
                    </div>
                    <div class=" tl pl50">
                        <input type="text" class="input_text w50 ie67" id="srand" name="srand" placeholder="请输入验证码" />
                        <img class="validate ml10 vt dib vm_ie7" src="/Login/ValidateCode" onclick="change_rand();" title="点击图片刷新验证码">
                        <a class="col666 vt_ie7 dib" href="javascript:change_rand();">换一张</a>
                    </div>
                </div>
                <div class="counterBox_row clearfix pt5 warn_text">
                    <div class="w40 fl tr">
                        <label class="">&nbsp;</label>
                    </div>
                    <div class=" tl pl50 colred4 s_srand" id="s_srand"></div>
                </div>
                <div class="counterBox_row clearfix mt5">
                    <div class=" w40 colblack2 fl tr">
                        <label class="label_text">&nbsp;</label>
                    </div>
                    <div class=" tl pl50">
                        <label>
                            <input type="checkbox" class="vv" id="rememberMe" name="rememberMe">记住用户名</label>
                    </div>
                </div>
                <div class="counterBox_row clearfix mt10">
                    <div class=" w40 colblack2 fl tr">
                        <label class="label_text">&nbsp;</label>
                    </div>
                    <div class=" tl pl50">
                        <input type="submit" id="btnSubmit" class="login_btn b0 fl hand" value="登录" />
                        <a class="colblue1 pl10 pt10 fl" href="/Login/ForgetPassword">忘记密码？</a>
                    </div>
                </div>
            </form>
            <table cellspacing="0" cellpadding="0" class="w col_table tc mt20 mb10 col666">
                <tbody>
                    <tr>
                        <td colspan="2" style="text-align: left; padding-top: 10px; padding-left: 18px;">绑定合作网站账号</td>
                    </tr>
                    <tr>
                        <td class="pt15 pb10" style="width: 94px;"><a href="https://p.yixin.com/oauth/login-sina.jhtml?state=YRD">
                            <img title="新浪微博" alt="新浪微博" src="/Images/sina_weibo.jpg"></a></td>
                        <td class="pt15 pb10" style="width: 94px;"><a href="https://p.yixin.com/oauth/login-renren.jhtml?state=YRD">
                            <img title="人人网" alt="人人网" src="/Images/renren.jpg"></a></td>
                    </tr>
                    <tr>
                        <td><a href="https://p.yixin.com/oauth/login-qq.jhtml?state=YRD">
                            <img title="QQ" alt="QQ" src="/Images/qq.jpg"></a></td>
                        <td><a href="https://p.yixin.com/oauth/login-douban.jhtml?state=YRD">
                            <img title="豆瓣" alt="豆瓣" src="/Images/douban.jpg"></a></td>
                    </tr>
                    <tr>
                        <td colspan="3">
                            <div class=" col_table  mt20 mb10"></div>
                            <a href="http://www.yirendai.com/creditgrade/creditgrade.action" target="_blank" title="参与信用评级，以备不时之需">
                                <img width="220" height="80" alt="参与信用评级，以备不时之需" title="参与信用评级，以备不时之需" style="margin-top: 12px;" src="/Images/gai-3.jpg">
                            </a>
                        </td>
                    </tr>
                </tbody>
            </table>
        </div>
    </div>
</div>
<div class="main_gray_bottom"><span class="main_gray_bottom_right"></span></div>
</div>

